Adaptive motion vector field coding

ABSTRACT

A method for motion compensated encoding of video data.  
     The method comprises the steps of:  
     generating a motion vector field of video pixels of a current frame to be coded based on a reference frame;  
     obtaining segmenting information defining the division of the current frame into image segments;  
     coding the motion vector field of an image segment S k  to provide compressed motion information comprising a motion coefficient vector c k  comprising a set of motion coefficients c i , such that c i ·f i (x,y) represents the motion vector field, whereby f i (x,y) defines a certain set of basis functions, wherein i is an index defining a correspondence between each basis function and a corresponding motion coefficient;  
     predicting a motion vector field of a subsequent image segment S L  with a set of predicted motion coefficients p i  based upon the previously generated motion coefficient vector c k ;  
     generating for the subsequent segment S L  a set of refinement motion coefficients r i  corresponding to the difference between the set of motion coefficients c i  and a set of predicted motion coefficients p i  such that p i +r i =c i .  
     Another aspects of the invention comprise corresponding video codec, mobile station, telecommunications network and computer program product.

FIELD OF THE INVENTION

[0001] The present invention relates to video compression. In particular, the invention relates to coding of an estimated motion field and to generating motion information in a video sequence.

BACKGROUND OF THE INVENTION

[0002] Motion compensated prediction is a key element of the majority of video coding schemes. To describe the operation of motion compensated prediction it should be appreciated that each digital image contains certain set of pixels corresponding to certain parts of the image. Each pixel may be represented, for example, as intensities of Red, Green and Blue (RGB color system) or as intensities of the luminance and two chrominance components.

[0003]FIG. 1 shows illustratively two segments of an image, S_(k) and S_(I), each showing a set of pixels 10 to 15 at old locations, that is in a previous image of a sequence of images. The new locations of these pixels in a current image are shown as positions 10′ to 15′. The change of their location, that is their motion, defines respective motion vectors v¹ _(k) to v³ _(k) and v¹ _(I) v³ _(I) of the pixels in these segments. At the simplest, the segments are squares or rectangles. Alternatively, and in legacy schemes, they may also be of an arbitrary form, as shown in FIG. 1.

[0004]FIG. 2 is a schematic diagram of an encoder for compression of video sequences using motion compensation. Essential elements in the encoder are a motion compensated prediction block 1, a motion field estimation block 2 and a motion field coder 3. The operating principle of motion compensating video coders is to compress the prediction error E_(n)(x, y), which is a difference between the incoming frame I_(n)(x, y) being coded, called the current frame, and a prediction frame Î_(n)(x, y), wherein:

E _(n)(x, y)=I _(n)(x, y)−Î _(n)(x, y)  (1)

[0005] The prediction frame Î_(n)(x, y) is constructed by the motion compensated prediction block 1 and is built using pixel values of the previous, or some other already coded frame denoted Ĩ_(ref)(x, y), called a reference frame, and the motion vectors of pixels between the current frame and the reference frame. Motion vectors are calculated by the motion field estimation block 2 and the resulting vector field is then coded in some way before being provided as an input to the prediction block 1. The prediction frame is then:

Î _(n)(x, y)=Ĩ _(ref) [x+{tilde over (Δ)}x(x, y), y+{tilde over (Δ)}y ( x, y)]  (2)

[0006] {tilde over (Δ)}x(x, y) and {tilde over (Δ)}y(x, y) are the values of horizontal and vertical displacement of pixel in location (x, y) and the pair of numbers [{tilde over (Δ)}x(x, y), {tilde over (Δ)}y(x, y) ] is called the motion vector of that pixel. The set of motion vectors of all pixels in the current frame I_(n)(x, y) is called a motion vector field. The coded motion vector field is transmitted as motion information to the decoder together with encoded prediction error information.

[0007] In the decoder, shown in FIG. 3, the current output frame Ĩ_(n)(x, y) is reconstructed by finding the pixels' prediction Î_(n)(x, y) in the reference frame Ĩ_(ref)(x, y) and adding a decoded prediction error Ê_(n)(x, y). The motion compensated prediction block 21 generates the prediction frame using the received motion information and the reference frame Ĩ_(ref)(x, y). The prediction error decoder 22 generates the decoded prediction error Ê_(n)(x, y) for adding to the prediction frame, the result being the current output frame Ĩ_(n)(x, y).

[0008] The general object of motion compensated (MC) prediction is to minimize amount of information which needs to be transmitted to the decoder together with the amount of prediction error measured, e.g., as the energy of E_(n)(x, y).

[0009] The document H. Nguen, E. Dubois, “Representation of motion information for image coding”. Proc. Picture Coding Symposium '90, Cambridge, Mass., Mar. 26-18, 1990, pages 841-845, gives a review of motion field coding techniques. As a rule of thumb, reduction of prediction error requires a more sophisticated motion field model, that is, more bits must be used for its encoding. Therefore, the overall goal of video encoding is to encode the motion vector field as compactly as possible while keeping the measure of prediction error as low as possible.

[0010] The motion field estimation block 2, shown in FIG. 2, calculates motion vectors of all the pixels of a given image segment minimizing some measure of prediction error in this segment, for example square prediction error.

[0011] Due to the very large number of pixels in the frame, it is not efficient to transmit a separate motion vector for each pixel. Instead, in most video coding schemes, the current frame is divided into larger image segments so that all motion vectors of the segment can be described by few parameters. Image segments may be square blocks, for example, 16×16 and 8×8 pixel blocks are used in codecs in accordance with international standards ISO/IEC MPEG-1, MPEG-2, MPEG-4 or ITU-T H.261 and H.263, or they may comprise arbitrarily shaped regions obtained for instance by a segmentation algorithm. In practice, segments include at least few tens of pixels.

[0012] In order to compactly represent the motion vectors of the pixels in a segment, it is desirable that the motion vectors are described by a function of few parameters. Such a function is called a motion vector field model. A known group of models is linear motion model, in which motion vectors are represented by linear combinations of motion field basis functions. In such models, the motion vectors of image segments are described by a general formula: $\begin{matrix} \begin{matrix} {{\Delta \quad {x\left( {x,y} \right)}} = {\sum\limits_{i = 1}^{N}{c_{i}{f_{i}\left( {x,y} \right)}}}} \\ {{{\Delta \quad {y\left( {x,y} \right)}} = {\sum\limits_{i = {N + 1}}^{N + M}{c_{i}{f_{i}\left( {x,y} \right)}}}},} \end{matrix} & (3) \end{matrix}$

[0013] where parameters c_(i) are called motion coefficients and are transmitted to the decoder. In general, the motion model for a segment is based on N+M motion coefficients. Functions f_(i)(x, y) are called motion field basis functions which and are known both to the encoder and decoder. Known motion field estimation techniques vary both in terms of the model used to represent the motion field and in the algorithm for minimization of a chosen measure of the prediction error.

[0014] Both the amount and the complexity of the motion varies between frames and between segments. In one case some of the content of the image may be rotated, skewed and shifted from one side of the image to the opposite side of the image. On the other hand, in another case a video camera may turn slowly about its vertical axis so that all the pixels move slightly in horizontal plane. Therefore, it is not efficient to always use all N+M motion coefficients per segment.

[0015] One way to reduce motion information is simply to reduce the number of motion coefficients from the motion field model that models the motion of pixels' locations from one image to another. However, the prediction error tends to increases, as the motion field model becomes coarser.

[0016] For every segment, it is necessary to determine the minimum number of motion coefficients that yields a satisfactorily low prediction error. The process of such adaptive selection of motion coefficients is called motion coefficient removal. This process is performed in the encoder by the motion field coding block 3, see FIG. 2. It is performed after motion field estimation performed by the motion field estimation block 2.

[0017] In future, digital video transmission will be possible between wireless mobile terminals. Usually such terminals have limited space for additional components and operate by a battery so that they are likely not accommodate computing capacity comparable to fixed devices such as desktop computers. Therefore, it is crucial that the motion field coding performed in a video coder is computationally simple so that it does not impose an excessive burden on the processor of the device. Additionally, the encoded motion field model should be computationally simple to facilitate later decoding at a decoder in a receiving (mobile) terminal.

[0018] Methods for performing motion estimation with different models and selecting the most suitable one are proposed in the documents H. Nicolas and C. Labit, “Region-based motion estimation using deterministic relaxation schemes for image sequence coding,” Proc. 1994 International Conference on Acoustics, Speech and Signal Processing, pp. III265-268 and P. Cicconi and H. Nicolas, “Efficient region-based motion estimation and symmetry oriented segmentation for image sequence coding,” IEEE Tran. on Circuits and Systems for Video Technology, Vol. 4, No. 3, June 1994, pp. 357-364. The methods attempt to adapt the motion model depending on the complexity of the motion by performing motion estimation with different models and selecting the most suitable one. The main disadvantage of these methods is their high computational complexity and the small number of different motion field models that can be tested in practice.

[0019] Yet another method is described in WO97/16025. A video codec includes a motion field coder for minimizing the number of motion coefficients of a motion vector field. In the coder, a first block includes means for forming a new matrix representation of the motion vector field. The new coded motion vector field is linear. A second main block includes means for merging pairs of adjacent segments if the combined segment area can be predicted using a common motion field. Merging information is transmitted to a decoder. A third main block includes means for removing motion field basis functions. After each removing step, the squared prediction error is calculated and removing is continued until the magnitude of the error is not acceptable. Final motion coefficients are calculated by solving a linear matrix equation. As a result, reduced number of motion coefficients for each segment is obtained. The motion coefficients are transmitted to the decoder. This approach allows removal of motion coefficients until a certain threshold of prediction error is reached.

[0020] However, there is still a need to further reduce the complexity of the motion encoding process as well as the amount of motion information that needs to be sent to the decoder while causing minimal deterioration in the quality of a decoded image.

[0021] An objective of the present invention is to reduce the amount of motion field vector information produced by the motion field estimation block 2 by a large factor without deteriorating the decoded image to a significant extent. Another objective is to keep the complexity of the motion field coder low to allow practical implementation using available signal processors or general-purpose microprocessors.

SUMMARY OF THE INVENTION

[0022] The invention is defined by the appended claims.

[0023] By taking advantage of the predicted motion coefficients in a Motion Analyzer that forms part of the motion field coder of a video encoder, a better rate-distortion performance is achieved than with prior known solutions.

[0024] Furthermore, a motion coefficient removal block can be used to compute a plurality of alternate combinations of motion coefficients to be used for further optimization of the rate-distortion performance. Preferably, the motion coefficient removal block is adapted to implement certain cost function to find a combination with which the ultimate rate-distortion will be optimized.

BRIEF DESCRIPTION OF THE DRAWINGS

[0025]FIG. 1 is a schematic diagram of an image divided in segments;

[0026]FIG. 2 is a schematic diagram of an encoder according to prior art;

[0027]FIG. 3 is a schematic diagram of a decoder according to prior art;

[0028]FIG. 4 is a Motion Field Coder according to an embodiment of the invention;

[0029]FIG. 5 is a Motion Analyzer according to an embodiment of the invention;

[0030]FIG. 6 is a schematic diagram of a mobile station according to an embodiment of the invention;

[0031]FIG. 7 is a schematic diagram of a mobile telecommunications network according to an embodiment of the invention.

DETAILED DESCRIPTION

[0032] FIGS. 1 to 3 are described above.

[0033] In the following, an overview of the invention is provided to facilitate the further description of various embodiments of the invention.

[0034] In accordance with a preferred embodiment of the invention, the motion field coder of a video encoder comprises two main blocks.

[0035] The first main block is called a Motion Analyzer 32, FIGS. 4 and 5. Its task is to find a new representation of the inputted motion field produced by the motion field estimation block 2, FIG. 2. This new representation is applied to the second main block, a motion coefficient removal block 34, FIG. 4. Operations in the Motion Analyzer include a plurality of steps comprising matrix operations: In the first step the prediction frame's dependency on motion vectors is linearized using an approximation method. In the second step, a matrix A_(k) and a vector d_(k) are constructed for minimization of the square prediction error. In the third step, a diagonal system of linear equations based on factorization of A_(k) is built in order to create a flexible motion representation in the form of a diagonal matrix R_(k) and an auxiliary vector z_(k).

[0036] The Motion Coefficient Removal block 34 inputs the diagonal matrix R_(k) and the auxiliary vector z_(k) produced by the Motion Analyzer block. Motion vectors of a segment are represented by a number of motion coefficients. For each of the segments, the motion coefficient removal block determines if it is possible to simplify the motion field model without causing an excessive increase in reconstruction error. Typically, some basis functions are removed from the motion model, whereby fewer coefficients are required to describe such a simplified motion field model.

[0037] The Motion Coefficient Removal block 34 modifies matrix equations involving the diagonal matrix R_(k) by removing one column of the diagonal matrix R_(k) and triangularizing the new system. As a result, there is one motion coefficient less in the equations and one term is removed from the vector z_(k). This operation corresponds to removal of one basis function from the motion field model. In order to determine a motion field model which optimizes a selected prediction error measure, or cost function, these operations are repeated until there are no basis functions remaining in the motion field model. Every time a basis function is removed, a new set of motion coefficients is evaluated by solving the matrix equations. This may be done by using any of the well known algorithms, for example, backsubstitution. The final set of motion parameters, i.e. chosen to represent the motion of a particular segment, is the one minimizing the cost function. Preferably, the cost function is a weighted sum of a measure of prediction error and a measure of information required for decoding the image.

[0038] For every processed segment, the Motion Coefficient Removal block 34 outputs selection information that defines the basis functions removed from the motion field model. Additionally, it outputs new motion coefficients corresponding to the remaining basis functions. Both the selection information and the new motion coefficients are transmitted to the decoder.

[0039]FIG. 4 illustrates a motion field encoder 3 according to an embodiment of the invention. It corresponds to the block 3 in FIG. 2. It inputs the reference frame Ĩ_(ref)(x, y), the current frame Ĩ_(n)(x, y), predicted motion coefficients, if any, and the motion vector field [Δx(x, y), Δy(x, y)] produced by the Motion Field Estimation block 2, FIG. 2.

[0040] The output of the video encoder contains a compressed frame divided into segments defined by motion coefficients for a segment S_(k), which consists of P pixels with coordinates (x_(i), y_(i)), i=1,2, . . . P. The task of the Motion Field Coder is to find the motion coefficients {tilde over (c)}=({tilde over (c)}₁,{tilde over (c)}₂, . . . , {tilde over (c)}_(N+M)) of a compressed motion vector field [{tilde over (Δ)}x(·),{tilde over (Δ)}y(·)] where the motion vectors are described by a linear motion model, the field being of the form: $\begin{matrix} \begin{matrix} {{\overset{\sim}{\Delta}{x\left( {x,y} \right)}} = {\sum\limits_{i = 1}^{N}{{\overset{\sim}{c}}_{i}{f_{i}\left( {x,y} \right)}}}} \\ {{\overset{\sim}{\Delta}{y\left( {x,y} \right)}} = {\sum\limits_{i = {N + 1}}^{N + M}{{\overset{\sim}{c}}_{i}{f_{i}\left( {x,y} \right)}}}} \end{matrix} & (4) \end{matrix}$

[0041] such that it minimizes a selected cost function, e.g. the Lagrangian cost:

L(S _(k))=D(S _(k))+λR(S _(k))  (5)

[0042] Where the distortion D(S_(k)) is the square error between the original and the coded segment. The rate R(S_(k)) is equal to the number of bits needed to code the segment and parameter λ is a predefined coefficient defining the trade-off between the quality of the coded segment and the number of bits required for the compression of the segment.

[0043] To fulfill this task, the Motion Field Coder 3 comprises two main blocks, which are the Motion Analyzer block 32 and the Motion Coefficient Removal block 34. The objective of the Motion Analyzer 32 is to find a new representation of the motion field. This new representation is used later, in the Motion Coefficient Removal block 34, to find motion coefficients for a given image segment in a fast and flexible manner. The Motion Coefficient Removal block 34 reduces the amount of motion information used to describe the motion field of a segment, which results in increase of the square prediction error, defined as $\begin{matrix} {\sum\limits_{i = 1}^{P}\left( {{I_{n}\left( {x_{i},y_{i}} \right)} - {{\overset{\sim}{I}}_{ref}\left( {{x_{i} + {\Delta \quad {x\left( {x_{i},y_{i}} \right)}}},{y_{i} + {\Delta \quad {y\left( {x_{i},y_{i}} \right)}}}} \right)}} \right)^{2}} & (6) \end{matrix}$

[0044] The operation of the Motion Analyzer 32 is next described in detail referring to FIG. 5. The operation of the Motion Analyzer 32 comprises the following steps:

[0045] Step 1: Linearization of the error, block 42. In this step the reference frame Ĩ_(ref)(·) in formula (6) is approximated using some known approximation method so that its dependency on [Δx(x, y), Δy(x, y)] becomes linear. Then the elements under the sum in formula (6) become a linear combination of motion coefficients c_(i) $\begin{matrix} {\sum\limits_{j = 1}^{P}\left( {{e_{j,1}c_{1}} + {e_{j,2}c_{2}} + \cdots + {e_{j,{N + M}}c_{N + M}} - y_{j}} \right)^{2}} & (7) \end{matrix}$

[0046] Step 2: Construction of matrices, block 43. Minimization of formula (7) is fully equivalent to minimization of the matrix expression (E_(k)c_(k)−Y_(k))^(T)(E_(k)c_(k)−y_(k)) or solving the following equation:

A_(k)c_(k)=d_(k)  (8)

[0047] where A_(k)=E_(k) ^(T)E_(k) and d_(k)=E_(k) ^(T)y_(k). The vector y_(k) is built in block 46. $\begin{matrix} \begin{matrix} {{E_{k} = \begin{bmatrix} e_{1,1} & e_{1,2} & \cdots & e_{1,{N + M}} \\ e_{2,1} & e_{2,2} & \cdots & e_{2,{N + M}} \\ \vdots & \vdots & \vdots & \vdots \\ e_{P,1} & e_{P,2} & \cdots & e_{P,{N + M}} \end{bmatrix}},} & \quad & {y_{k} = \begin{bmatrix} y_{1} \\ y_{2} \\ \vdots \\ y_{P} \end{bmatrix}} \end{matrix} & (9) \end{matrix}$

[0048] Step 3: Triangularization and creation of output, block 44. In this step equation (8) is triangularized using a known method to decompose A_(k) into a product of a lower diagonal matrix R_(k) ^(T) and its transpose R_(k)

A_(k)=R_(k) ^(T)R_(k)  (10)

[0049] This may be carried out using Cholesky decomposition.

[0050] An auxiliary vector z_(k) ⁰ is created solving

R_(k) ^(T)z_(k) ⁰=d_(k)  (11)

[0051] for example, using backsubstitution. The vector of motion coefficients c_(k) minimizing the formula (7) is now the unknown vector in the diagonal system

R_(k)c_(k)=z_(k) ⁰  (12)

[0052] and can be solved when needed, for example, by using backsubstitution.

[0053] The motion coefficients c_(k) can be given as sums of predicted motion coefficients p_(k) and refinement motion coefficients r_(k). The predicted motion coefficients are predicted from previously generated motion coefficients and the refinement motion coefficients correspond to the difference between the predicted motion coefficients and motion coefficients calculated in the Motion Field estimation block (FIG. 2). In this case, equation (12) has the form:

R _(k)(r _(k) +p _(k))=z _(k) ⁰  (13)

[0054] and, an output vector z_(k) is created by calculating

z _(k) =z _(k) ⁰ −R _(k) p _(k)  (14)

[0055] Block 47 forms the term z_(k) ⁰ and block 45 generates the term R_(k)p_(k). The output of the following Motion Coefficient Removal block 34 becomes refinement motion coefficients instead of absolute motion coefficients. Otherwise output vector z_(k)=z_(k) ⁰.

[0056] Motion Coefficient Removal block 34 receives as input matrix R_(k) and vector z_(k) produced by the Motion Analyzer block 32. Motion vectors of every segment are represented by N+M motion coefficients.

[0057] For a given segment S_(k), the Motion Coefficient Removal block determines if it is possible to simplify the motion field model, without excessively increasing the selected error measure. A simplified motion field model is obtained when some basis functions are removed from the model in equations (3) described in the background art of this application. Fewer coefficients are required to describe such a simplified motion field model.

[0058] The following iterative procedure is performed in order to find the optimal motion vector field.

[0059] Step A: Initial cost calculation. A Lagrangian cost for the segment is evaluated with the full motion model and stored together with the full set of motion coefficients.

[0060] Step B: Finding the basis function with the smallest impact on prediction quality. Let R_(k) ^(n) denote an n×n upper diagonal characteristic matrix with n basis functions remaining and R_(k) ^(n,i) the same matrix with the i'th column removed. n sets of equations are generated each with the i'th column removed from the matrix R_(k) ^(n) and the i'th element removed form the vector c_(k) ^(n):

R_(k) ^(n,i)=z_(k) ^(n), i=1, . . . n  (15)

[0061] All the equations generated are triangularized in a known manner by applying a series of multiplications of rows by scalars followed by additions of the rows, i.e., equation (15) is converted to the form: $\begin{matrix} \begin{matrix} {{{\begin{bmatrix} r_{1,1}^{i} & r_{1,2}^{i} & r_{1,3}^{i} & \cdots & r_{1,{n - 1}}^{i} \\ 0 & r_{2,2}^{i} & r_{2,3}^{i} & \cdots & r_{2,{n - 1}}^{i} \\ 0 & 0 & r_{3,3}^{i} & \cdots & r_{3,{n - 1}}^{i} \\ 0 & 0 & 0 & ⋰ & \vdots \\ 0 & 0 & 0 & \cdots & r_{{n - 1},{n - 1}}^{i} \\ 0 & 0 & 0 & \cdots & 0 \end{bmatrix}\begin{bmatrix} c_{1}^{i} \\ c_{2}^{i} \\ c_{3}^{i} \\ \vdots \\ c_{n - 1}^{i} \end{bmatrix}} = \begin{bmatrix} z_{1}^{i} \\ z_{2}^{i} \\ z_{3}^{i} \\ \vdots \\ z_{n - 1}^{i} \\ q_{i} \end{bmatrix}},} & {{i = 1},\ldots \quad,n} \end{matrix} & (16) \end{matrix}$

[0062] Where (q_(i))² is an approximation of the increase in the square prediction error due to removing the i'th basis function from the motion model. The column yielding the smallest (q_(i))² when removed is the one to be removed during this iteration, effectively causing the i'th basis function to be removed from the motion model.

[0063] Step C: Removing a basis function from the model. A new matrix equation is built by selecting matrix R_(k) ^(n,i) and vector z_(k) ^(n,i) associated with the basis function to be removed and removing the last row of the matrix and the last element of the vector as follows: $\begin{matrix} \begin{matrix} {{R_{k}^{n - 1} = \begin{bmatrix} r_{1,1}^{i} & r_{1,2}^{i} & r_{1,3}^{i} & \cdots & r_{1,{n - 1}}^{i} \\ 0 & r_{2,2}^{i} & r_{2,3}^{i} & \cdots & r_{2,{n - 1}}^{i} \\ 0 & 0 & r_{3,3}^{i} & \cdots & r_{3,{n - 1}}^{i} \\ 0 & 0 & 0 & ⋰ & \vdots \\ 0 & 0 & 0 & 0 & r_{{n - 1},{n - 1}}^{i} \end{bmatrix}},} & \quad & {z_{k}^{n - 1} = \begin{bmatrix} z_{1}^{i} \\ z_{2}^{i} \\ z_{3}^{i} \\ \vdots \\ z_{n - 1}^{i} \end{bmatrix}} \end{matrix} & (17) \end{matrix}$

[0064] Step D: Coefficient calculation. A new set of motion coefficients for the reduced set of basis functions is calculated by solving the triangular system:

R_(k) ^(n−1)c_(k) ^(n−1)=z_(k) ^(n−1)  (18)

[0065] e.g. by backsubstitution.

[0066] Step E: Cost calculation. A Lagrangian cost for the segment is evaluated and stored together with the set of motion parameters if this model is the best one so far.

[0067] Step F: Final motion model selection. If there are still basis functions to be removed, steps B to E are repeated. If all the basis functions have been removed from the model, the output is generated. The output comprises selection information, describing which basis functions should be removed from motion field model, together with new motion coefficients corresponding to the remaining basis functions. Both selection information and motion coefficients are transmitted to the decoder.

[0068] The main advantage of the present invention over prior art solutions is its ability to reduce the amount of motion information by a large factor without causing a large increase in reconstruction error. Additionally, the complexity of the overall system is low which allows practical implementation on available signal processors or general-purpose microprocessors.

[0069] The Motion Coefficient Removal block is a very powerful tool for instantaneous adaptation of the motion model to the actual amount and type of motion in the video scene. This block can be used to test a large number of motion models, with or without motion parameter prediction. A strong advantage of this scheme is that it does not need to repeat the process of motion estimation when changing motion model and hence it is computationally simple.

[0070] By using motion estimation followed by Motion Analyzer the motion field coder can find new motion coefficients for any desired model of the motion field by solving computationally a very simple systems of linear equations.

[0071] In the preferred embodiment, an orthonormalized affine motion vector field model with 6 coefficients is used. In practice, this model can handle with a high degree of accuracy even very complex motion in video sequences and yields good prediction results.

[0072] The affine motion vector field is a motion model that can be used to approximate motion vectors with a set of motion coefficients. The affine motion model allows description of various types of motion, including translational, rotational, zooming and skewing movements. It comprises 6 basis functions, in which case, the motion vectors may be substantially replaced by a sum involving six basis functions multiplied by motion coefficients, each motion coefficient computed for one particular basis function. The basis functions themselves are known to both the encoder and decoder.

[0073] In the Motion Analyzer block 32, linearization in step 1 is performed using Taylor expansion of the reference frame Ĩ_(ref)(x, y) at every pixel (x_(i), y_(i)) where i=1,2, . . . , P (P being the number of pixels in the segment) around points:

x′ _(i) =x _(i) +Δx(x _(i) , y _(i))

y′ _(i) =y _(i) +Δy(x _(i) , y _(i))  (19)

[0074] Using the property that Σa²=Σ(−a)² , the prediction error is then $\begin{matrix} \begin{matrix} {\sum\limits_{i = 1}^{P}\left( {{{\overset{\sim}{I}}_{ref}\left( {x_{i}^{\prime},y_{i}^{\prime}} \right)} + {\left( {{\overset{\sim}{\Delta}{x\left( {x_{i},y_{i}} \right)}} - {\Delta \quad {x\left( {x_{i},y_{i}} \right)}}} \right){G_{x}\left( {x_{i}^{\prime},y_{i}^{\prime}} \right)}} +} \right.} \\ \left. \quad {{\left( {{\overset{\sim}{\Delta}{y\left( {x_{i},y_{i}} \right)}} - {\Delta \quad {y\left( {x_{i},y_{i}} \right)}}} \right){G_{y}\left( {x_{i}^{\prime},y_{i}^{\prime}} \right)}} - {I_{n}\left( {x_{i},y_{i}} \right)}} \right)^{2} \end{matrix} & (20) \end{matrix}$

[0075] Auxiliary values g_(j)(x, y) are calculated using the formula: $\begin{matrix} {{g_{j}\left( {x_{i},y_{i}} \right)} = \left\{ \begin{matrix} {{f_{j}\left( {x_{i},y_{i}} \right)}{G_{x}\left( {x_{i}^{\prime},y_{i}^{\prime}} \right)}} & {{{{when}\quad j} = 1},2,\ldots \quad,N} \\ {{f_{j}\left( {x_{i},y_{i}} \right)}{G_{y}\left( {x_{i}^{\prime},y_{i}^{\prime}} \right)}} & {{{{when}\quad j} = {N + 1}},{N + 2},\ldots \quad,{N + M}} \end{matrix} \right.} & (21) \end{matrix}$

[0076] where functions f_(j)(x_(i), y_(i)) are basis function as defined in equation (4). Matrix E_(k) and vector y_(k) in equation (9) are built using formulae: $\begin{matrix} {E_{k} = \begin{bmatrix} {g_{1}\left( {x_{1},y_{1}} \right)} & {g_{2}\left( {x_{1},y_{1}} \right)} & \cdots & {g_{N + M}\left( {x_{1},y_{1}} \right)} \\ {g_{1}\left( {x_{2},y_{2}} \right)} & {g_{2}\left( {x_{2},y_{2}} \right)} & \cdots & {g_{N + M}\left( {x_{2},y_{2}} \right)} \\ \vdots & \vdots & \vdots & \vdots \\ {g_{1}\left( {x_{P},y_{P}} \right)} & {g_{2}\left( {x_{P},y_{P}} \right)} & \cdots & {g_{N + M}\left( {x_{P},y_{P}} \right)} \end{bmatrix}} & (22) \\ {y_{k} = \begin{bmatrix} \begin{matrix} {{I_{n}\left( {x_{1},y_{1}} \right)} - {{\overset{\sim}{I}}_{ref}\left( {x_{1}^{\prime},y_{1}^{\prime}} \right)} + {{G_{x}\left( {x_{1}^{\prime},y_{1}^{\prime}} \right)}\Delta \quad {x\left( {x_{1},y_{1}} \right)}} +} \\ {{G_{y}\left( {x_{1}^{\prime},y_{1}^{\prime}} \right)}\Delta \quad {y\left( {x_{1},y_{1}} \right)}} \end{matrix} \\ \begin{matrix} {{I_{n}\left( {x_{2},y_{2}} \right)} - {{\overset{\sim}{I}}_{ref}\left( {x_{2}^{\prime},y_{2}^{\prime}} \right)} + {{G_{x}\left( {x_{2}^{\prime},y_{2}^{\prime}} \right)}\Delta \quad {x\left( {x_{2},y_{2}} \right)}} +} \\ {{G_{y}\left( {x_{2}^{\prime},y_{2}^{\prime}} \right)}\Delta \quad {y\left( {x_{2},y_{2}} \right)}} \end{matrix} \\ \vdots \\ \begin{matrix} {{I_{n}\left( {x_{P},y_{P}} \right)} - {{\overset{\sim}{I}}_{ref}\left( {x_{P}^{\prime},y_{P}^{\prime}} \right)} + {{G_{x}\left( {x_{P}^{\prime},y_{P}^{\prime}} \right)}\Delta \quad {x\left( {x_{P},y_{P}} \right)}} +} \\ {{G_{y}\left( {x_{P}^{\prime},y_{P}^{\prime}} \right)}\Delta \quad {y\left( {x_{P},y_{P}} \right)}} \end{matrix} \end{bmatrix}} & (23) \end{matrix}$

[0077] G_(x)(x, y) and G_(y)(x, y) are values of the horizontal and vertical gradient of the reference frame Ĩ_(ref)(x, y) calculated using the derivative of the well known cubic spline interpolation function.

[0078] Matrix A_(k) is factorized using Cholesky decomposition and the system in formula (15) is triangularized using a sequence of Givens rotations.

[0079] Motion coefficients for new motion models are calculated by solving equation (18) using a backsubstitution algorithm.

[0080] The pixel values of Ĩ_(ref)(x, y), G_(x)(x, y) and G_(y)(x, y) are defined only for integer coordinates of x and y. When x or y are non-integers the pixel value is calculated using cubic spline interpolation using integer pixel values in the vicinity of x and y.

[0081]FIG. 6 shows a mobile station MS according to an embodiment of the invention. A central processing unit, microprocessor μP controls the blocks responsible for different functions of the mobile station: a random access memory RAM, a radio frequency block RF, a read only memory ROM, a user interface UI having a display DPL and a keyboard KBD, and a digital camera block CAM. The microprocessor's operating instructions, that is program code and the mobile station'sbasic functions have been stored in the mobile station in advance, for example during the manufacturing process, in the ROM. In accordance with its program, the microprocessor uses the RF block for transmitting and receiving messages on a radio path. The microprocessor monitors the state of the user interface UI and controls the digital camera block CAM. In response to a user command, the microprocessor instructs the camera block CAM to record a digital image into the RAM. Once the image is captured or alternatively during the capturing process, the microprocessor segments the image into image segments and computes motion field models for the segments in order to generate a compressed image as explained in the foregoing description. A user may command the mobile station to display the image on its display or to send the compressed image using the RF block to another mobile station, wired telephone, facsimile device or another telecommunications device. In a preferred embodiment, such transmission of image is started as soon as the first segment is encoded so that the recipient can start decoding process with a minimum delay. In an alternative embodiment, the mobile station comprises an encoder block ENC dedicated for encoding and possibly also for decoding of digital video data.

[0082]FIG. 7 is a schematic diagram of a mobile telecommunications network according to an embodiment of the invention. Mobile stations MS are in communication with base stations BTS by means of a radio link. The base stations BTS are further connected, through a so-called Abis interface, to a base station controller BSC, which controls and manages several base stations. The entity formed by a number of base stations BTS (typically, by a few dozen base stations) and a single base station controller BSC, controlling the base stations, is called a base station system BSS. Particularly, the base station controller BSC manages radio communication channels and handovers. On the other hand, the base station controller BSC is connected, through a so-called A interface, to a mobile services switching centre MSC, which co-ordinates the formation of connections both from and to mobile stations. A further connection is made, through the mobile service switching centre MSC, to outside the mobile communications network. Outside the mobile communications network there may further reside other network(s) connected to the mobile communications network by gateway(s) GTW, for example the Internet. In such external network, or in the telecommunications network, there may be located another video decoding or encoding stations, such as computers PC. In an embodiment of the invention, the mobile telecommunications network comprises a video server VSRVR to provide video data to a MS subscribing to such a service. This video data is compressed by using the motion compensated video compression method as described earlier in this document. The video server may function as a gateway to an online video source or it may comprise previously recorded video clips.

[0083] The system can be implemented in a variety of ways without departing from the spirit and scope of the invention. For instance:

[0084] Different motion models can be used.

[0085] Different cost functions can be used instead of the Lagrangian cost given in equation (5).

[0086] Different methods can be used to linearize the term in formula (6).

[0087] Different factorization algorithms can be used in the Motion Analyzer (e.g. QR decomposition instead of Cholesky decomposition).

[0088] The strategy for deciding the removal order of basis functions may vary (e.g. a predefined order can be used instead of evaluating q_(i)'s in equation (16)).

[0089] Some motion models can be skipped in the Motion Coefficient Removal block (e.g. if some input coefficients have negligible amplitude, algorithm may decide to discard corresponding basis functions).

[0090] Cost calculation in the Motion Coefficient Removal block does not have to take place immediately after removal of a basis function but can be delayed. This means that in the Coefficient Removal block Steps B-D may be iterated instead of steps B-E. Step E (cost calculation) can then be performed in another loop for all the generated motion models (for this segment).

[0091] Triangularization of the system in equation (15) can be performed using various algorithms.

[0092] Calculation of final coefficients by solving equation (18) can be performed using a number of known algorithms for solving systems of linear equations.

[0093] Prediction terms in equations (13) and (14) can be incorporated alternatively by substituting motion vectors (Δx(x_(i), y_(i)) and Δy(x_(i), y_(i))) in equation (23) by motion vector refinements (differences between estimated motion vectors and predicted motion vectors).

[0094] Different interpolation methods can be used to obtain values of Ĩ_(n−1)(x, y), G_(x)(x, y) and G_(y)(x, y) in non-integer coordinates. 

1. (Cancelled)
 2. (Cancelled).
 3. (Cancelled)
 4. (Cancelled).
 5. (Cancelled)
 6. (Cancelled).
 7. (Cancelled)
 8. (Cancelled)
 9. (Cancelled)
 10. (Cancelled).
 11. (Cancelled)
 12. (Cancelled).
 13. (Cancelled)
 14. (Cancelled).
 15. (Cancelled)
 16. (Cancelled).
 17. (Cancelled)
 18. (Cancelled)
 19. (Cancelled)
 20. (Cancelled).
 21. A video encoder for motion compensated encoding of video data comprising: means for generating a first motion vector for a first image segment S_(K) of a current frame to be encoded, based on a reference frame; motion field encoding means for representing the first motion vector as a first motion coefficient vector c_(K) comprising a first set of absolute motion coefficients c_(i), such that c_(i)·f_(i)(x,y) represents an approximation of the first motion vector, f_(i)(x,y) defines a set of basis functions and i is an index that defines correspondences between particular basis functions and absolute motion coefficients c_(i); means for generating a second motion vector for a second image segment S_(L) of the current frame to be subsequently encoded, based on the reference frame; motion field encoding means for representing the second motion vector as a second motion coefficient vector c_(L) comprising a second set of absolute motion coefficients c_(j), such that c_(j)·f_(j)(x,y) represents an approximation of the second motion vector, f_(j)(x,y) defines a set of basis functions and j is an index that defines correspondences between particular basis functions and absolutemotion coefficients c_(j); motion coefficient prediction means for predicting a predicted motion coefficient vector p_(L) for the second image segment S_(L), the predicted motion coefficient vector p_(L) comprising a set of predicted motion coefficients p_(j), based upon the previously generated first motion coefficient vector c_(K); means for representing each of the absolute motion coefficients c_(j) of the second set of absolute motion coefficients as a sum of a corresponding predicted motion coefficient p_(j) and refinement motion coefficient r_(j), where each of the refinement motion coefficients r_(j) represents the difference between one of the absolute motion coefficients c_(j) and the corresponding predicted motion coefficient p_(j); means for representing the second motion coefficient vector c_(L) as a vector r_(L) of refinement motion coefficients r_(j).
 22. A video encoder according to claim 21, wherein each of the motion vectors is represented by an affine motion model.
 23. A video encoder according to claim 21, wherein the absolute motion coefficients, the refinement motion coefficients, and the predicted motion coefficients together with the corresponding basis functions represent an affine motion model.
 24. A video encoder according to claim 21, further comprising: means for computing a first cost representing an amount of information required to represent segment S_(L) using the absolute motion coefficients c_(j) of the second motion vector c_(L) and an amount of image distortion produced when segment S_(L) is thus represented; means for computing a second cost representing an amount of information required to represent segment S_(L) using the vector r_(L) of refinement motion coefficients r_(j) and an amount of image distortion produced when segment S_(L) is thus represented; means for identifying the smaller of the first and second costs; the encoder being arranged to represent segment S_(L) with whichever of the second motion vector c_(L) and the vector r_(L) of refinement coefficients provides the smaller cost.
 25. A video encoder according to claim 21, further comprising: means for calculating a matrix E_(L) and a vector y_(L) for the second image segment S_(L); means for calculating a predefined distortion measure for the second segment as a function of E_(L) c_(L)−y_(L), c_(L) being the second motion vector comprising the second set of absolute motion coefficients c_(j); and means for generating a diagonal matrix R_(L) and a corresponding vector z_(L) ⁰ from the matrix E_(L) and a vector y_(L).
 26. A video encoder according to claim 25, further comprising means for obtaining matrix R_(L) by decomposing matrix A_(L)=E_(L) ^(T)E_(L) into a lower diagonal matrix R_(L) ^(T) and its transpose R_(L) so that A_(L)=R_(L) ^(T)R_(L).
 27. A video encoder according to claim 25, further comprising means for obtaining vector z_(L) ⁰ by calculating d_(L)=E_(L) ^(T)y_(L) and solving the set of equations R_(L) ^(T)z_(L) ⁰=d_(L).
 28. A video encoder according to claim 25, further comprising means for calculating an output vector z_(L)=z_(L) ⁰−R_(L)p_(L), where p_(L) is the predicted motion coefficient vector for segment S_(L).
 29. A storage device comprising a video encoder according to claim
 21. 30. A mobile station comprising a video encoder according to claim
 21. 31. A mobile telecommunications network comprising a video encoder according to claim
 21. 32. A computer program product comprising a video encoder according to claim
 21. 33. A method for motion compensated encoding of video data comprising: generating a first motion vector for a first image segment S_(K) of a current frame to be encoded, based on a reference frame; representing the first motion vector as a first motion coefficient vector c_(K) comprising a first set of absolute motion coefficients c_(i), such that c_(i)·f_(i)(x,y) represents an approximation of the first motion vector, f_(i)(x,y) defines a set of basis functions and i is an index that defines correspondences between particular basis functions and absolute motion coefficients c_(i); generating a second motion vector for a second image segment S_(L) of the current frame to be subsequently encoded, based on the reference frame; representing the second motion vector as a second motion coefficient vector c_(L) comprising a second set of absolute motion coefficients c_(j), such that c_(j)·f_(j)(x,y) represents an approximation of the second motion vector, f_(j)(x,y) defines a set of basis functions and j is an index that defines correspondences between particular basis functions and absolute motion coefficients c_(j); predicting a predicted motion coefficient vector p_(L) for the second image segment S_(L), the predicted motion coefficient vector p_(L) comprising a set of predicted motion coefficients p_(j), based upon the first motion coefficient vector c_(K); representing each of the absolute motion coefficients c_(j) of the second set of absolute motion coefficients as a sum of a corresponding predicted motion coefficient p_(j) and refinement motion coefficient r_(j), where each of the refinement motion coefficients r_(j) represents a difference between one of the absolute motion coefficients c_(j) and a corresponding predicted motion coefficient p_(j); representing the second motion coefficient vector c_(L) as a vector r_(L) of refinement motion coefficients r_(j).
 34. A method according to claim 33, wherein each of the motion vectors is represented by an affine motion model.
 35. A method according to claim 33, wherein the absolute motion coefficients, the refinement motion coefficients, and the predicted motion coefficients together with the corresponding basis functions represent an affine motion model.
 36. A method according to claim 33, further comprising: computing a first cost representing an amount of information required to represent segment S_(L) using the absolute motion coefficients c_(j) of the second motion vector c_(L) and an amount of image distortion produced when segment S_(L) is thus represented; computing a second cost representing an amount of information required to represent segment S_(L) using the vector r_(L) of refinement motion coefficients r_(j) and an amount of image distortion produced when segment S_(L) is thus represented; identifying the smaller of the first and second costs; and representing segment S_(L) with whichever of the second motion vector c_(L) and the vector r_(L) of refinement coefficients that provides the smaller cost.
 37. A method according to claim 33, further comprising: calculating a matrix E_(L) and a vector y_(L) for the second image segment S_(L); calculating a predefined distortion measure for the second segment S_(L) as a function of E_(L) c_(L)−y_(L), c_(L) being the second motion vector comprising the second set of absolute motion coefficients c_(j); and generating a diagonal matrix R_(L) and a corresponding vector z_(L) ⁰ from the matrix E_(L) and a vector y_(L).
 38. A method according to claim 37, further comprising obtaining matrix R_(L) by decomposing matrix A_(L)=E_(L) ^(T)E_(L) into a lower diagonal matrix R_(L) ^(T) and its transpose R_(L) so that A_(L)=R_(L) ^(T)R_(L).
 39. A method according to claim 37, further comprising obtaining vector z_(L) ⁰ by calculating d_(L)=E_(L) ^(T)y_(L) and solving the set of equations R_(L) ^(T)z_(L) ⁰=d_(L).
 40. A method according to claim 37, further comprising: calculating an output vector z_(L)=z_(L) ⁰−R_(L)p_(L), where p_(L) is the predicted motion coefficient. 